package server;

import java.io.IOException;

/**
 * @Description: 自定义Servlet实现
 * @Author jie.luo
 * @Create: 2020-06-23 22:51
 **/
public class CustomServlet extends HttpServlet {

    @Override
    public void doGet(Request request, Response response) {

        String content = "<h1>Custom Servlet-Get</h1>";
        try {
            response.output(HttpProtocolUtil.getHttpHeader200(content.getBytes().length) + content);
        } catch (Exception e) {
            e.printStackTrace();
        }

    }

    @Override
    public void doPost(Request request, Response response) {

    }

    @Override
    public void init() throws Exception {

    }

    @Override
    public void destory() throws Exception {

    }
}
